package com.example.generator.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName t_work
 */
@TableName("t_work")
@Data
public class TWork implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 工作名称
     */
    private String workName;

    /**
     * 工作年限
     */
    private String workYear;

    /**
     * 休息天数
     */
    private Integer restDay;

    /**
     * 月薪
     */
    private Integer salary;

    /**
     * 日薪
     */
    private Integer daySalary;

    /**
     * 每天工作时间/h
     */
    private Double dayWorkTime;

    /**
     * 通勤时长/h
     */
    private Double commutingTime;

    /**
     * 摸鱼时长/h
     */
    private Double moyuTime;

    /**
     * 工作城市
     */
    private String workCity;

    /**
     * 学历
     */
    private Integer educationalBackground;

    /**
     * 工作地区
     */
    private Integer workArea;

    /**
     * 异性数量
     */
    private Integer oppositeSex;

    /**
     * 同事关系
     */
    private Integer colleagueRelationship;

    /**
     * 压力
     */
    private Integer workStress;

    /**
     * 稳定性
     */
    private Integer workStable;

    /**
     * 职业要求
     */
    private Integer occupationalRequirement;

    /**
     * 得分
     */
    private Double score;

    private Date addTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TWork other = (TWork) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getWorkName() == null ? other.getWorkName() == null : this.getWorkName().equals(other.getWorkName()))
            && (this.getWorkYear() == null ? other.getWorkYear() == null : this.getWorkYear().equals(other.getWorkYear()))
            && (this.getRestDay() == null ? other.getRestDay() == null : this.getRestDay().equals(other.getRestDay()))
            && (this.getSalary() == null ? other.getSalary() == null : this.getSalary().equals(other.getSalary()))
            && (this.getDaySalary() == null ? other.getDaySalary() == null : this.getDaySalary().equals(other.getDaySalary()))
            && (this.getDayWorkTime() == null ? other.getDayWorkTime() == null : this.getDayWorkTime().equals(other.getDayWorkTime()))
            && (this.getCommutingTime() == null ? other.getCommutingTime() == null : this.getCommutingTime().equals(other.getCommutingTime()))
            && (this.getWorkCity() == null ? other.getWorkCity() == null : this.getWorkCity().equals(other.getWorkCity()))
            && (this.getEducationalBackground() == null ? other.getEducationalBackground() == null : this.getEducationalBackground().equals(other.getEducationalBackground()))
            && (this.getWorkArea() == null ? other.getWorkArea() == null : this.getWorkArea().equals(other.getWorkArea()))
            && (this.getOppositeSex() == null ? other.getOppositeSex() == null : this.getOppositeSex().equals(other.getOppositeSex()))
            && (this.getColleagueRelationship() == null ? other.getColleagueRelationship() == null : this.getColleagueRelationship().equals(other.getColleagueRelationship()))
            && (this.getWorkStress() == null ? other.getWorkStress() == null : this.getWorkStress().equals(other.getWorkStress()))
            && (this.getWorkStable() == null ? other.getWorkStable() == null : this.getWorkStable().equals(other.getWorkStable()))
            && (this.getOccupationalRequirement() == null ? other.getOccupationalRequirement() == null : this.getOccupationalRequirement().equals(other.getOccupationalRequirement()))
            && (this.getScore() == null ? other.getScore() == null : this.getScore().equals(other.getScore()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getWorkName() == null) ? 0 : getWorkName().hashCode());
        result = prime * result + ((getWorkYear() == null) ? 0 : getWorkYear().hashCode());
        result = prime * result + ((getRestDay() == null) ? 0 : getRestDay().hashCode());
        result = prime * result + ((getSalary() == null) ? 0 : getSalary().hashCode());
        result = prime * result + ((getDaySalary() == null) ? 0 : getDaySalary().hashCode());
        result = prime * result + ((getDayWorkTime() == null) ? 0 : getDayWorkTime().hashCode());
        result = prime * result + ((getCommutingTime() == null) ? 0 : getCommutingTime().hashCode());
        result = prime * result + ((getWorkCity() == null) ? 0 : getWorkCity().hashCode());
        result = prime * result + ((getEducationalBackground() == null) ? 0 : getEducationalBackground().hashCode());
        result = prime * result + ((getWorkArea() == null) ? 0 : getWorkArea().hashCode());
        result = prime * result + ((getOppositeSex() == null) ? 0 : getOppositeSex().hashCode());
        result = prime * result + ((getColleagueRelationship() == null) ? 0 : getColleagueRelationship().hashCode());
        result = prime * result + ((getWorkStress() == null) ? 0 : getWorkStress().hashCode());
        result = prime * result + ((getWorkStable() == null) ? 0 : getWorkStable().hashCode());
        result = prime * result + ((getOccupationalRequirement() == null) ? 0 : getOccupationalRequirement().hashCode());
        result = prime * result + ((getScore() == null) ? 0 : getScore().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", workName=").append(workName);
        sb.append(", workYear=").append(workYear);
        sb.append(", restDay=").append(restDay);
        sb.append(", salary=").append(salary);
        sb.append(", daySalary=").append(daySalary);
        sb.append(", dayWorkTime=").append(dayWorkTime);
        sb.append(", commutingTime=").append(commutingTime);
        sb.append(", workCity=").append(workCity);
        sb.append(", educationalBackground=").append(educationalBackground);
        sb.append(", workArea=").append(workArea);
        sb.append(", oppositeSex=").append(oppositeSex);
        sb.append(", colleagueRelationship=").append(colleagueRelationship);
        sb.append(", workStress=").append(workStress);
        sb.append(", workStable=").append(workStable);
        sb.append(", occupationalRequirement=").append(occupationalRequirement);
        sb.append(", score=").append(score);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}